# Zero-II

This repository contains all (my) projects with the RigExpert's 'Zero-II' programmable antenna analyzer.<br>

---

### *Table of contents:*

* [Projects in this repository](#projects)<br>
* [The Zero II board](#the-zero-ii-board)<br>
* [Setup](#setup)<br>
* [Gotchas](#gotchas)<br>
* [References](#references)<br>
* [License](#license)<br>
* [Author](#author)<br>

---
## Projects
---
Only one for now:

1. [Basic SWR measurement with a RigExpert Zero-II and an arduino nano.](arduino_nano/basic_swr_measurement/README.md)

---
## The Zero II board
---

* Specifications:>>
    * operating frequency range: from 100 kHz to 1 GHz
    * size: 55*35 mm.
    * user interfaces: HID, UART, I2C, SPI
    * USB connector (for firmware updates, power supply, connection to gadgets via OTG)
    * current consumption: about 120mA in measurement mode
    * antenna connector: SMA
    * weight: 10 grams

<img src="board_overview.jpg" width="600"><br>
The size is 55x35 mm.<br>

<img src="board_front.jpg" width="600"><br>
The frontside.<br>

<img src="board_back.jpg" width="600"><br>
The backside.<br>

---
## Setup
---

The setup of the board can be quite tricky thanks to the rather incomplete [documentation][0].<br>
The [video of Ed March][9] and the reviews on the [www.dxengineering.com][5] website
(especially that of "JAMES") helped me a lot.<br>

Here is what I did (as of 2024-01-30):


1. First I soldered male DuPont connectors to the pads. [James][5] recommends to solder wires to each pad.
<img src="board_front.jpg" width="200"><br>
Yellow DuPont connectors^

2. Before hooking up the ZEROII you must peal the protective plastic cover off the tiny power switch
and move the white switch to the USB position - see the pictures [here][11] and [here][10].

3. Download the Flash utility from RigExperts website. There is no dedicated Flash utility for Zero-II.
It seems as if the same utility were used for all their boards. Download here for [windows][14] or [mac][15].
As of the time of writing the file is called [rigexpert-flash-tool-v1.6.4.exe][14] or [rigexpert-flash-tool-ver_1.6.4.dmg][15].
Please keep in mind that this software might be outdated in a few weeks from writing this article.
So better have a look at RigExpert's [support page][13] in the "Downloads" tab yourself.

4. Download the newest [firmware][12] from RigExperts website. As of the time of writing this the filename
is [fw_zeroii_ver_1_0_38400.bin][12].
Please keep in mind that this firmware might be superceeded by a new one in a few weeks from writing this article.
So better have a look at RigExpert's [support page][13] in the "Downloads" tab yourself.

5. Connect the Zero-II to the computer with a high quality USB cable.

6. Start the Flash utility program.<br>
<img src="flash01.png" width="300"><br>
Flash utility^

7. Click “Next” and the Zero-II will be recognized.<br>
<img src="flash02.png" width="300"><br>
Click "Next"^

8. Click “Update from local file”. In the window find the firmware .bin file and click on it.<br>
<img src="flash03.png" width="300"><br>
Click "Next" to continue ...^

9. The file will be uploaded and you will get a confirmation that the firmware update is complete.<br>
<img src="flash04.png" width="300"><br>
Update complete -> click "Finish"^

10. Unplug the USB cable.

11. Dont forget to move the white power switch to "EXT" position when you power the board with an external source.

---
## Gotchas
---
People on the internet who have worked with the Zero-II seem to be impressed by the hardware but do
complain about the documentation and the source code that is provided by [RigExpert][16].
In order to keep you from loosing time with fiddling around I try to collect the problems you might run into here on this page.<br>
Most of my information comes from:<br>

* Ed March's (WB9RAA) videos on youtube [here][18], [here][19] and [here][20]
* the reviews on the [www.dxengineering.com][5]
* [Gerner's github page][17]
* my own experiences

Here are the most common problems you could run into:

* The board is shipped with the wrong firmware. Flash it with the right firmware before you use it.
See [here](#setup) for instructions.
* The serial port speed is 38400 baud.
* The power slide must be in the [right position][11].
* External power supply is 5 Volt minimum ( probably up to 48V? ).
* The original code supplied by RigExpert is buggy:
    * It uses double instead of float which keeps it from working with the ESP32 microprocessor.
    * It seems to have timing issues.
    * It polls the onboard STM32 microprocessor too often and thus slows it down.
    * It uses software serial ports in the examples even when there are dedicated hardware serial ports (why?).
    * When I used their example code it seemed to have timing issues. After the third measurement it got stuck and delivered only the last values over and over again.
* Ed March (WB9RAA) has improved the original library and addressed a lot of the above issues.
  You can download it [here][21].
* The pads across the usb port do not have the standard spacing.
That is why some people had to [bend the DuPont headers][10].
* Note that the ZERO II may not connect if you are using a large TFT screen. Disconnect and try again.
* Your code must initialize the ZERO II before the TFT screen.

---
## References
---

* https://rigexpert.com/files/libraries/RigExpertZeroII_UART/RigExpertZeroII_UART.zip
* https://rigexpert.com/files/manuals/zeroII/ZEROII_user_manual.pdf
* https://rigexpert.com/files/manuals/zeroII/
* https://rigexpert.com/news/zero-ii-the-tiny-and-powerful-analyzer/
* https://rigexpert.com/downloads/
* https://rigexpert.com/wp-content/uploads/2023/04/fw_zeroii_ver_1_0_38400.bin
* https://rigexpert.com/wp-content/uploads/2023/10/rigexpert-flash-tool-v1.6.4.exe
* https://rigexpert.com/wp-content/uploads/2023/10/rigexpert-flash-tool-ver_1.6.4.dmg
* https://static.dxengineering.com/global/images/technicalarticles/reu-zero-ii.pdf
* https://www.dxengineering.com/parts/reu-zero-ii/reviews
* https://wb9raa.com/AAZ-II/
* https://github.com/gerner/zeroii-analyzer
* https://www.youtube.com/watch?v=3K6qOPxwzps
* https://www.youtube.com/watch?v=Au5EDlXOcOs
* https://www.youtube.com/watch?v=6Gk67iNEcU4

## License
---
* GNU GENERAL PUBLIC LICENSE Version 3

## Author:
---
* kaulquappe (https://notabug.org/kaulquappe/)



[0]: https://rigexpert.com/wp-content/uploads/2023/06/zeroii_user_manual.pdf
[1]: https://static.dxengineering.com/global/images/technicalarticles/reu-zero-ii.pdf
[2]: https://rigexpert.com/files/libraries/RigExpertZeroII_UART/RigExpertZeroII_UART.zip
[3]: https://rigexpert.com/files/manuals/zeroII/ZEROII_user_manual.pdf
[4]: https://rigexpert.com/news/zero-ii-the-tiny-and-powerful-analyzer/
[5]: https://www.dxengineering.com/parts/reu-zero-ii/reviews
[6]: https://wb9raa.com/AAZ-II/
[7]: https://github.com/gerner/zeroii-analyzer
[8]: https://www.youtube.com/watch?v=k0yOb7h5t74
[9]: https://www.youtube.com/watch?v=3K6qOPxwzps&lc=
[10]: https://github.com/gerner/zeroii-analyzer/blob/main/zeroii_issues.png
[11]: https://photos-us.bazaarvoice.com/photo/2/cGhvdG86ZHhlbmdpbmVlcmluZw/ca9df788-17a8-5e8d-aac3-b4d4adbc42ac
[12]: https://rigexpert.com/wp-content/uploads/2023/04/fw_zeroii_ver_1_0_38400.bin
[13]: https://rigexpert.com/downloads/
[14]: https://rigexpert.com/wp-content/uploads/2023/10/rigexpert-flash-tool-v1.6.4.exe
[15]: https://rigexpert.com/wp-content/uploads/2023/10/rigexpert-flash-tool-ver_1.6.4.dmg
[16]: https://rigexpert.com
[17]: https://github.com/gerner/zeroii-analyzer
[18]: https://www.youtube.com/watch?v=3K6qOPxwzps
[19]: https://www.youtube.com/watch?v=Au5EDlXOcOs
[20]: https://www.youtube.com/watch?v=6Gk67iNEcU4
[21]: https://wb9raa.com/AAZ-II/Project/
